derivative of log functions